From 674cfd49f297dd438e5fcefc8ad2dbedeeda2af0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 9 Jul 2025 05:56:27 +0200 Subject: [PATCH] network: Make sortByName to properly handle null values g_utf8_collate is not nullable, but is used in a relevant piece of code, so better not to throw any error if a null value is compared Part-of: --- js/ui/status/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 4cabfda65..96ca1ad02 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -116,7 +116,7 @@ class ItemSorter { } _sortByName(one, two) { - return GLib.utf8_collate(one.name, two.name); + return GLib.utf8_collate(one.name ?? '', two.name ?? ''); } _sortByMru(one, two) { -- 2.39.5